﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class SearchPage : System.Web.UI.Page
{
    string clentIp;
    protected void Page_Load(object sender, EventArgs e)
    {
        string clentIp = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
        if (!string.IsNullOrEmpty(clentIp))
        {
            string[] ipRange = clentIp.Split(',');
            int le = ipRange.Length - 1;
            string trueIP = ipRange[le];
        }
        else
        {
            clentIp = Request.ServerVariables["REMOTE_ADDR"];
        }
        btnQuestions.Text = clentIp;
    }
    protected void Location_Click(object sender, EventArgs e)
    {
        MultiView1.ActiveViewIndex = 0;
        
    }
    protected void btnSearchDirection_Click(object sender, EventArgs e)
    {
        MultiView1.ActiveViewIndex = 1;
    }
    protected void btnSearchCompany_Click(object sender, EventArgs e)
    {
        MultiView1.ActiveViewIndex = 2;
    }
    protected void btnQuestions_Click(object sender, EventArgs e)
    {
        MultiView1.ActiveViewIndex = 3;
    }
}